<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>SemOpt: src/Labelling.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">SemOpt
   &#160;<span id="projectnumber">0.2alpha5-SCC</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('Labelling_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">src/Labelling.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;map&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00004"></a>00004 <span class="keyword">using namespace </span>std;
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;Argument.h&quot;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;SetArguments.h&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;map&gt;</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="preprocessor">#ifndef LABELLING_H_</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define LABELLING_H_</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span>
<a name="l00014"></a>00014 <span class="keyword">typedef</span> <span class="keywordtype">string</span> Label;
<a name="l00015"></a>00015 
<a name="l00019"></a><a class="code" href="classLabelIterator.html">00019</a> <span class="keyword">class </span><a class="code" href="classLabelIterator.html" title="Class defining a const iterator for the elements of a the labellings.">LabelIterator</a> : <span class="keyword">public</span> map&lt;Argument*, Label&gt;::const_iterator
<a name="l00020"></a>00020 {
<a name="l00021"></a>00021 <span class="keyword">public</span>:
<a name="l00022"></a>00022         <a class="code" href="classLabelIterator.html" title="Class defining a const iterator for the elements of a the labellings.">LabelIterator</a>() : map&lt;Argument*, Label&gt;::const_iterator() {
<a name="l00023"></a>00023         };
<a name="l00024"></a>00024         <a class="code" href="classLabelIterator.html" title="Class defining a const iterator for the elements of a the labellings.">LabelIterator</a>(map&lt;Argument*, Label&gt;::const_iterator it) : map&lt;Argument*, Label&gt;::const_iterator(it) {
<a name="l00025"></a>00025         };
<a name="l00026"></a>00026         Label* operator-&gt;() {
<a name="l00027"></a>00027                 <span class="keywordflow">return</span> (Label* <span class="keyword">const</span>)&amp;(map&lt;Argument*,Label&gt;::const_iterator::operator-&gt;()-&gt;second);
<a name="l00028"></a>00028         };
<a name="l00029"></a>00029         Label operator*() {
<a name="l00030"></a>00030                 <span class="keywordflow">return</span> map&lt;Argument*, Label&gt;::const_iterator::operator*().second;
<a name="l00031"></a>00031         }
<a name="l00032"></a>00032         <a class="code" href="classLabelIterator.html" title="Class defining a const iterator for the elements of a the labellings.">LabelIterator</a> &amp;operator=(<span class="keyword">const</span> <a class="code" href="classLabelIterator.html" title="Class defining a const iterator for the elements of a the labellings.">LabelIterator</a> &amp;param) {
<a name="l00033"></a>00033                 map&lt;Argument*, Label&gt;::const_iterator::operator = (param);
<a name="l00034"></a>00034                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00035"></a>00035         }
<a name="l00046"></a><a class="code" href="classLabelIterator.html#aca208d6741e26dac5c5c440aea2fe455">00046</a>         <a class="code" href="classArgument.html" title="Class representing an Argument.">Argument</a>* <a class="code" href="classLabelIterator.html#aca208d6741e26dac5c5c440aea2fe455" title="return the value of the key of the pair pointed by this iterator">getKeyValue</a>(){
<a name="l00047"></a>00047                 <span class="keywordflow">return</span> (map&lt;Argument*,Label&gt;::const_iterator(*<span class="keyword">this</span>))-&gt;first;
<a name="l00048"></a>00048         }
<a name="l00049"></a>00049 };
<a name="l00050"></a>00050 
<a name="l00051"></a><a class="code" href="classLabelling.html">00051</a> <span class="keyword">class </span><a class="code" href="classLabelling.html" title="Class representing a single labelling assignment.">Labelling</a>
<a name="l00052"></a>00052 {
<a name="l00062"></a><a class="code" href="classLabelling.html#a8512ec47bffffe4ca1d8650cc61e55a9">00062</a>         map&lt;Argument *, Label&gt; <a class="code" href="classLabelling.html#a8512ec47bffffe4ca1d8650cc61e55a9">labelling</a>;
<a name="l00063"></a>00063         <a class="code" href="classSetArguments.html" title="Class encompassing a set of arguments.">SetArguments</a> in;
<a name="l00064"></a>00064         <a class="code" href="classSetArguments.html" title="Class encompassing a set of arguments.">SetArguments</a> out;
<a name="l00065"></a>00065         <a class="code" href="classSetArguments.html" title="Class encompassing a set of arguments.">SetArguments</a> undec;
<a name="l00066"></a>00066 
<a name="l00067"></a>00067 <span class="keyword">public</span>:
<a name="l00068"></a>00068 
<a name="l00069"></a><a class="code" href="classLabelling.html#aaf7f367dd2253b297cad3c622a0d2f49">00069</a>         <span class="keyword">const</span> <span class="keyword">static</span> Label <a class="code" href="classLabelling.html#aaf7f367dd2253b297cad3c622a0d2f49" title="Label representing an `in` argument.">lab_in</a>;
<a name="l00070"></a><a class="code" href="classLabelling.html#afed946f9be5cb9f3d60ca37e4baf45ba">00070</a>         <span class="keyword">const</span> <span class="keyword">static</span> Label <a class="code" href="classLabelling.html#afed946f9be5cb9f3d60ca37e4baf45ba" title="Label representing an `out` argument.">lab_out</a>;
<a name="l00071"></a><a class="code" href="classLabelling.html#a4ae2c985855b2a4c084618b6493b0d92">00071</a>         <span class="keyword">const</span> <span class="keyword">static</span> Label <a class="code" href="classLabelling.html#a4ae2c985855b2a4c084618b6493b0d92" title="Label representing an `undec` argument.">lab_undec</a>;
<a name="l00072"></a>00072         <a class="code" href="classLabelling.html" title="Class representing a single labelling assignment.">Labelling</a>();
<a name="l00073"></a>00073         <a class="code" href="classLabelling.html" title="Class representing a single labelling assignment.">Labelling</a>(<a class="code" href="classSetArguments.html" title="Class encompassing a set of arguments.">SetArguments</a>* <span class="keyword">set</span>);
<a name="l00074"></a>00074         <span class="keyword">virtual</span> ~<a class="code" href="classLabelling.html" title="Class representing a single labelling assignment.">Labelling</a>();
<a name="l00075"></a>00075         <span class="keywordtype">void</span> add_label(<a class="code" href="classArgument.html" title="Class representing an Argument.">Argument</a> *, Label);
<a name="l00076"></a>00076         <span class="keywordtype">bool</span> exists_argument_labelling(<a class="code" href="classArgument.html" title="Class representing an Argument.">Argument</a> *);
<a name="l00077"></a>00077         Label get_label(<a class="code" href="classArgument.html" title="Class representing an Argument.">Argument</a> *);
<a name="l00078"></a>00078         <a class="code" href="classSetArguments.html" title="Class encompassing a set of arguments.">SetArguments</a> *inargs();
<a name="l00079"></a>00079         <a class="code" href="classSetArguments.html" title="Class encompassing a set of arguments.">SetArguments</a> *outargs();
<a name="l00080"></a>00080         <a class="code" href="classSetArguments.html" title="Class encompassing a set of arguments.">SetArguments</a> *undecargs();
<a name="l00081"></a>00081         <span class="keywordtype">bool</span> empty();
<a name="l00082"></a>00082         <span class="keywordtype">void</span> clone(<a class="code" href="classLabelling.html" title="Class representing a single labelling assignment.">Labelling</a> *);
<a name="l00083"></a>00083 
<a name="l00084"></a>00084         <a class="code" href="classSetArguments.html" title="Class encompassing a set of arguments.">SetArguments</a>* getSetArguments();
<a name="l00085"></a>00085         <a class="code" href="classLabelIterator.html" title="Class defining a const iterator for the elements of a the labellings.">LabelIterator</a> begin() <span class="keyword">const</span>;
<a name="l00086"></a>00086         <a class="code" href="classLabelIterator.html" title="Class defining a const iterator for the elements of a the labellings.">LabelIterator</a> end() <span class="keyword">const</span>;
<a name="l00087"></a>00087         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size() <span class="keyword">const</span>;
<a name="l00088"></a>00088 
<a name="l00089"></a>00089         <a class="code" href="classLabelIterator.html" title="Class defining a const iterator for the elements of a the labellings.">LabelIterator</a> find(<span class="keyword">const</span> <a class="code" href="classArgument.html" title="Class representing an Argument.">Argument</a>* arg);
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 };
<a name="l00092"></a>00092 
<a name="l00093"></a>00093 <span class="keywordtype">bool</span> <a class="code" href="Labelling_8cpp.html#ac4e0bfe6bf8d4ca2df0ffffe90d87f9e" title="compare two Labelling according to their list.">operator==</a>(<span class="keyword">const</span> <a class="code" href="classLabelling.html" title="Class representing a single labelling assignment.">Labelling</a>&amp; lhs,<span class="keyword">const</span> <a class="code" href="classLabelling.html" title="Class representing a single labelling assignment.">Labelling</a>&amp; rhs);
<a name="l00094"></a>00094 <span class="keywordtype">bool</span> <a class="code" href="Labelling_8cpp.html#a51bee584f2dc4685db614fec131cc1c3" title="computes the opposite of the operator ==">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classLabelling.html" title="Class representing a single labelling assignment.">Labelling</a>&amp; lhs,<span class="keyword">const</span> <a class="code" href="classLabelling.html" title="Class representing a single labelling assignment.">Labelling</a>&amp; rhs);
<a name="l00095"></a>00095 
<a name="l00096"></a>00096 ostream&amp; <a class="code" href="Argument_8cpp.html#a76ef732a0021f3ac6698582cf94a079e">operator&lt;&lt;</a>(ostream&amp; , <span class="keyword">const</span> <a class="code" href="classLabelling.html" title="Class representing a single labelling assignment.">Labelling</a>&amp; );
<a name="l00097"></a>00097 
<a name="l00098"></a>00098 <span class="preprocessor">#endif </span><span class="comment">/* LABELLING_H_ */</span>
</pre></div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>Labelling.h</b>      </li>

    <li class="footer">Generated on Fri Jan 17 2014 11:47:51 for SemOpt by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
